﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace MacroprocesosWPF.Administrador.Administrador.ControUsuario
{
    /// <summary>
    /// Lógica de interacción para DialogAgregar.xaml
    /// </summary>
    public partial class DialogAgregar : Window
    {
        string insertar;

        public string Insertar
        {
            get { return insertar; }
            set { insertar = value; }
        }
        
        public DialogAgregar()
        {
            InitializeComponent();
        }

        private void btnCerrar_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        private void btnAceptar_Click(object sender, RoutedEventArgs e)
        {
            if (rbEmpresa.IsChecked.Value || 
                rbProceso.IsChecked.Value ||
                rbDocumento.IsChecked.Value)            
            {
                if (rbEmpresa.IsChecked.Value)
                {
                    Insertar = "EMPRESA";
                }
                else if (rbProceso.IsChecked.Value)
                {
                    Insertar = "PROCESO";
                }
                else if (rbDocumento.IsChecked.Value)
                {
                    Insertar = "DOCUMENTO";
                }

                this.Close();
            }
        }
    }
}
